package com.tsinghua.discharge.controller;

import com.tsinghua.discharge.common.ServerResponse;
import com.tsinghua.discharge.service.ConditionSelectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

@RestController
@RequestMapping("/ConditionSelect")

public class ConditionSelectController {
    @Autowired
    ConditionSelectService conditionSelectService;
    @RequestMapping(value = "/SupSector.do",method = RequestMethod.GET)
    @ResponseBody
    public ServerResponse supSectorSelect(HttpSession session){

        return conditionSelectService.supSectorSelect(session);
    }
    @RequestMapping(value = "/Sector.do",method = RequestMethod.POST)
    @ResponseBody
    public ServerResponse sectorSelect(String supSector,HttpSession session){

        return conditionSelectService.sectorSelect(supSector,session);
    }
    @RequestMapping(value = "/Service.do",method = RequestMethod.POST)
    @ResponseBody
    public ServerResponse serviceSelect(String sector,HttpSession session){

        return conditionSelectService.serviceSelect(sector,session);
    }
    @RequestMapping(value = "/Technology.do",method = RequestMethod.POST)
    @ResponseBody
    public ServerResponse technologySelect(String service,HttpSession session){

        return conditionSelectService.technologySelect(service,session);
    }
    @RequestMapping(value = "/Region.do",method = RequestMethod.GET)
    @ResponseBody
    public ServerResponse regionSelect(HttpSession session){

        return conditionSelectService.regionSelect(session);
    }
    @RequestMapping(value = "/Date.do",method = RequestMethod.GET)
    @ResponseBody
    public ServerResponse dateSelect(HttpSession session){

        return conditionSelectService.dateSelect(session);
    }
    @RequestMapping(value = "/Scenario.do",method = RequestMethod.GET)
    @ResponseBody
    public ServerResponse scenarioSelect(HttpSession session){

        return conditionSelectService.scenarioSelect(session);
    }
    @RequestMapping(value = "/Fuel.do",method = RequestMethod.GET)
    @ResponseBody
    public ServerResponse fuelSelect(HttpSession session){

        return conditionSelectService.fuelSelect(session);
    }
}
